package com.hboxs.asl.entity;


import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name = "xx_giveaway")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_giveaway_sequence")
public class Giveaway extends BaseEntity {

    private static final long serialVersionUID = -4215983883917055862L;

    public Giveaway() {
    }

    public Giveaway(BigDecimal quota, Date startDate, Date endDate, Product product, String title) {
        this.quota = quota;
        this.startDate = startDate;
        this.endDate = endDate;
        this.product = product;
        this.title = title;

    }

    /**
     * 充值金额
     */
    private BigDecimal quota;

    /**
     * 开始时间
     */
    private Date startDate;

    /**
     * 结束时间
     */
    private Date endDate;

    /**
     * 赠品包含的商品
     */
    private Product product;

    /**
     * 标题
     */
    private String title;

    public BigDecimal getQuota() {
        return quota;
    }

    public void setQuota(BigDecimal quota) {
        this.quota = quota;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @OneToOne
    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }


}
